package com.ht.pms.core.dao.impl;

import com.ht.pms.core.dao.EmailUserEncryptDao;
import com.ht.pms.core.dto.user.EmailUserInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.dao.EmptyResultDataAccessException;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class EmailUserEncryptDaoImpl implements EmailUserEncryptDao {

    @Autowired
    private JdbcTemplate jdbcTemplate;

    @Override
    public List<Map<String,Object>> findUserInfo() {


        List<Map<String,Object>> map = null;
        StringBuilder sb = new StringBuilder();
        sb.append("select t.common_name AS name,t.common_value AS value from t_common_choice t where t.common_type=3 ");
        try {

            map = jdbcTemplate.queryForList(sb.toString());
        } catch (EmptyResultDataAccessException e) {
        }
        System.out.println(sb.toString());
        return map;
    }
}
